package personal.han.main;

import personal.han.service.CompareTableService;
import personal.han.service.impl.CompareTableServiceImpl;

import java.util.List;

/**
 * @author tanghan
 * @Description TODO
 * @date 2021/05/11/ 15:50:00
 */
public class MainApplication {
    public static void main(String[] args) {
        CompareTableService compareTableService = new CompareTableServiceImpl();
        List<String> result = compareTableService.compareTableInfo();
        StringBuilder stringBuilder = new StringBuilder();
        StringBuilder stringBuilder1 = new StringBuilder();
        StringBuilder field = new StringBuilder();
        StringBuilder fieldNotExit = new StringBuilder();
        result.forEach(o -> {
            if (o.startsWith("模板库")) {
                stringBuilder.append(o).append("\n");
            } else {
                stringBuilder1.append(o).append("\n");
            }

            if (o.contains("的字段类型不一致")){
                field.append(o).append("\n");
            }

            if (o.contains("的表不存在字段名为")&&o.startsWith("pcgl_saas_20210510")){
                fieldNotExit.append(o).append("\n");
            }

        });
//        System.out.println(stringBuilder.toString());
//        System.out.println(stringBuilder1.toString());

//        System.out.println("-----------------------");
//        System.out.println(field.toString());
        System.out.println("=======================================");
        System.out.println(fieldNotExit.toString());
    }
}
